using System;
using System.Collections.Generic;
using System.Text;
using EntLibContrib.Validation.Configuration;

namespace EntLibContrib.Validation.Design.Nodes
{
    public class ExternallyConfiguredObjectCollectionValidatorNode : ExternallyConfiguredObjectValidatorNode
    {
        public ExternallyConfiguredObjectCollectionValidatorNode()
            :this(new ExternallyConfiguredObjectCollectionValidatorData(Resources.ExternallyConfiguredObjectCollectionValidatorNodeName))
        {
        }

        public ExternallyConfiguredObjectCollectionValidatorNode(ExternallyConfiguredObjectCollectionValidatorData validatorData)
            :base(validatorData)
        {
        }

        public override Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidatorData CreateValidatorData()
        {
            ExternallyConfiguredObjectCollectionValidatorData validatorData = new ExternallyConfiguredObjectCollectionValidatorData(Name);
            base.SetValidatorBaseProperties(validatorData);

            validatorData.TargetConfigurationFile = TargetConfigurationFile;
            validatorData.TargetRuleset = TargetRuleSet;

            return validatorData;
        }
    }
}
